#!/usr/bin/env python
# -*- coding: utf-8 -*-

import requests
import urllib

def Chk_url(url):
	url_sta = { 'url':'',
				'status_code':0,
				'cookie':''}
	url_sta['url'] = url
	r = requests.get(url)
	url_sta['status_code'] = r.status_code
	url_sta['cookie'] = r.headers['set-cookie']
	#if r.status_code ==200:
	return url_sta

def main():
	urls = open('url.txt','r').read().split('&')
	for url in urls:
		if url.split('=')[1].find('http') != -1:
			#print url.split('=')[1]
			print Chk_url(urllib.unquote(url.split('=')[1]))

if __name__ == '__main__':
	main()



